# Contributor: Martin Wimpress <code@flexion.org>

pkgname=mate-applet-streamer
pkgver=0.4.1
pkgrel=1
pkgdesc="MATE panel applet to let you play your favourite online radio station with a single click"
url="http://www.zavedil.com/online-radio-applet/"
arch=('loong64' 'x86_64')
license=('GPL')
depends=('gst-plugins-base' 'libnotify' 'mate-panel')
optdepends=('gst-plugins-bad: for playing MP3 streams')
source=("https://github.com/assen-totin/mate-applet-streamer/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha1sums=('8c78ff4c88705ef151f33ba0708f94d610b2cbc4')
sha256sums=('96e580b4cad1f70a6efc4820ec8cdf826f65ee304cc0210d7f8b5a7360c2e7c1')

build() {
    cd ${pkgname}-${pkgver}
    CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
    ./autogen.sh
    ./configure \
        --prefix=/usr \
        --libexecdir=/usr/lib/${pkgname}
    make
}

package() {
    cd ${pkgname}-${pkgver}
    make DESTDIR="${pkgdir}" install
    rm -f "${pkgdir}/usr/share/glib-2.0/schemas/gschemas.compiled"
}
